<ul class="maintabmenu multipletabmenu">        
    <li><a href="<?php echo base_url();?>administrator/restaurents/index">Tất cả nhà hàng</a></li>
    <li ><a href="<?php echo base_url();?>administrator/restaurents/add"> Thêm mới nhà hàng</a></li>
    <li class="current"><a href="<?php echo base_url();?>administrator/restaurents/edit/<?php echo $id; ?>"> Sửa nhà hàng</a></li>
</ul> 
<div class="content">                	
    <form method="post" action="<?php echo base_url();?>administrator/restaurents/edit/<?php echo $id; ?>" class="stdform" id="formID">
        <div class="edit-main"> 
            
            <div id="wizard" class="wizard post-lang">                
                <div class="stepContainer">
                                         
                        <p><label>Tên Nhà Hàng:</label></p>
                        <p><span class="field"><input type="text" class="longinput validate[required]" name="name" value="<?php echo $restaurent->name; ?>"/></span></p>
                        </br>  
                        <p><label>Đường dẫn:</label></p>
                        <p><span class="field"><input type="text" class="longinput validate[required]" name="slug" value="<?php echo urldecode($restaurent->slug); ?>"/></span></p>
                        </br>                      
                        <p><label>Điện thoại:</label></p>
                        <p><span class="field"><input type="text" class="mediuminput validate[required]" name="phone" value="<?php echo $restaurent->phone; ?>"/></span></p>
                        </br>
                        <p><label>Fax:</label></p>
                        <p><span class="field"><input type="text" class="mediuminput validate[required]" name="fax" value="<?php echo $restaurent->fax; ?>"/></span></p>
                        </br>
                        <p><label>Email:</label></p>
                        <p><span class="field"><input type="text" class="mediuminput validate[required]" name="email" value="<?php echo $restaurent->email; ?>"/></span></p>
                        </br>
                        <p><label>Địa chỉ:</label></p>
                        <p><span class="field"><textarea name="address" class="address[required]"><?php echo $restaurent->address; ?></textarea></span></p>
                        </br>
                        <p><label>Mô tả:</label></p>                            
                        <p><span class="field"><textarea name="description" class="validate[required]"><?php echo $restaurent->description; ?></textarea></span></p>
                        </br>
                        <p><label>Nội dung:</label></p>                            
                        <p><textarea name="content" id="editor_contentvi" class="validate[required]"><?php echo $restaurent->content; ?></textarea></p>            
                        </br>

                        <div class="seo-packages widgetbox">
                            <div class="contenttitle">
                                <h2 class="form">
                                    <span>All in One SEO Pack</span>
                                </h2>
                            </div>                
                            <div class="widgetcontent">
                                <p>
                                    <label>Title</label>
                                    <span class="field small-form">
                                        <input class="mediuminput" type="text" name="seo_title" value="<?php echo $seo_title; ?>" onkeyup="countCharactor(this.value,'<?php echo 'txtlength';?>');">
                                    </span>
                                    <input type="text" id="txtlength" class="length-count" value="0" style="text-align:center;" maxlength="3" size="3" name="lengthT" readonly="">
                                    <small class="desc small-desc"> Most search engines use a maximum of 60 chars for the title.</small>
                                </p>
                                <p>
                                    <label>Description</label>
                                    <span class="field small-form">
                                        <textarea id="location" class="mediuminput" name="seo_description" rows="5" cols="80" onkeyup="countCharactors(this.value,'txtlength2');"><?php echo $seo_description; ?></textarea>
                                    </span>
                                    <input type="text" id="txtlength2" class="length-count" value="0" style="text-align:center;" maxlength="3" size="3" name="lengthT" readonly="">
                                    <small class="desc small-desc"> Most search engines use a maximum of 160 chars for the description.</small>
                                </p>
                                <p>
                                    <label>Keywords</label>
                                    <span class="field small-form">
                                        <input class="mediuminput" type="text" name="seo_keyword" value="<?php echo $seo_keyword; ?>">
                                    </span>                        
                                </p>
                            </div>
                        </div>                                                             
                </div>
            </div>
        </div>
        <div class="edit-right">
            <div class="widgetbox">
                <div class="title"><h2 class="general"><span>Xuất bản</span></h2></div>
                <div class="widgetcontent" style="display: block;">
                    <p class="status-ddl">
                        Trạng thái:
                        <select name="status">
                            <option value="open" <?php if($restaurent->status =='open') echo "selected='selected'";?>>Open</option>
                            <option value="close" <?php if($restaurent->status =='close') echo "selected='selected'";?>>Close</option>
                            <option value="pending" <?php if($restaurent->status =='pending') echo "selected='selected'";?>>Pending</option>
                        </select>                         
                    </p>
                    <p class="status-ddl">
                        Thời gian xuất bản:
                        <input type="text" id="txtDatePublish" value="<?php echo date_format(date_create($restaurent->create_date),'d-m-Y H:i:s');?>" class="datetimepicker validate[required]" name="create_date">
                    </p>
                    <p class="stdformbutton">
                        <button class="submit radius2">Xuất bản</button>
                        <input type="reset" value="Hủy" class="reset radius2">
                    </p>
                </div><!--widgetcontent-->
            </div>
                       
            <div class="widgetbox">
                <div class="title"><h2 class="general"><span>Ảnh đại diện</span></h2></div>
                <div class="widgetcontent" style="display: block;">
                    <input type="hidden" id="featured_image" name="image" value="<?php echo $restaurent->image;?>">
                    <img src="<?php echo $restaurent->image;?>" id="featured_image_src" width="100%" height="auto" style="margin-bottom:10px;" />
                    <button id="imageUpload" class="submit radius2" >Chọn ảnh đại diện</button>
                </div>
            </div>
        </div>
    </form>              
</div><!--content-->
<script type="text/javascript">
    //var lstLang = jQuery('#lstLangCode').attr('value');
    //var list = lstLang.split(',');
    //if(list.length>0)
    {
        //for(var i=0;i<list.length;i++)
        {
            var editor = CKEDITOR.replace( 'editor_contentvi',
            {			
                filebrowserBrowseUrl : '<?php echo base_url();?>elfinder/elfinder.php?mode=file',
                filebrowserImageBrowseUrl : '<?php echo base_url();?>elfinder/elfinder.php?mode=image',
                filebrowserFlashBrowseUrl : '<?php echo base_url();?>elfinder/elfinder.php?mode=flash',
                filebrowserImageUploadUrl : '<?php echo base_url();?>elfinder/elfinder.php?mode=image',
                filebrowserFlashUploadUrl : '<?php echo base_url();?>elfinder/elfinder.php?mode=flash',
                filebrowserImageWindowWidth : '950',
                filebrowserImageWindowHeight : '490',
                filebrowserWindowWidth : '950',
                filebrowserWindowHeight : '490'
            });
        }
    }
	

</script></script>